<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<script language="JavaScript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script language="JavaScript" src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript">
	//记录当前记录的ID
	var businessCodeID="";
	var businessCode="";

	//当改点选表格行数据时，触发本事件
	function changeID(id,code){
		businessCodeID = id;
		businessCode = code;
	}

	function search(){
		$('form1').action="${ctx}/charge_parameterDefAction.do?method=initSelectChargeItem&iframeName=${iframeName}"
		$('form1').submit();
	}

	function save(){
		eval("findFrame('" + "${iframeName}" + "')." + "selectBusinessCodeInfo('" + businessCodeID + "','"+businessCode+"')");
		windowClose();
	}
</script>
</head>
<body>
<form id="form1" action="" method="post" target="_self">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="window_head_outBg">
		<table border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td><img src="${ctx}/images/ico_Advance.gif" width="16"
					height="16" align="absmiddle"><span
					class="window_head_intext">${key.chargeItemSelect}</span></td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="aux_header_line_1"></td>
	</tr>
	<tr>
		<td class="aux_header_line_2"></td>
	</tr>
	<tr>
		<td class="content">
		<table width="100%" border="0" cellspacing="0" cellpadding="0"
			class="tab_line">
			<tr>
				<td class="aux_intable_td22">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td colspan="4" class="bg_toolBar">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="right">
								<!--------------------------右边图标01----------------------------------->
								<table border="0" align="left" cellpadding="0" cellspacing="1"
									id="search01">
									<tr>
										<td class="grid align_left">${key.chargeItem}：</td>
										<td class="td_search">
										<table border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td><input name="code" type="text"
													class="inputtext" size="16"></td>
												<td width="4">&nbsp;</td>
											</tr>
										</table>
										</td>
										<td>
										<table border="0" align="right" cellpadding="0"
											cellspacing="0" onClick="clickShow(search_result)">
											<tr>
												<td class="buttonOffLeft" id="btn1_41"></td>
												<td class="buttonOffMiddle" id="btn1_42"
													onblur="btn_change(4)" onMouseOver="btn_change_over(4)"
													onMouseOut="btn_change_out(4)" onclick="search();"><img
													src="${ctx}/images/ico_searchico.gif" alt="" border="0"
													align="absmiddle"> ${key.search}</td>
												<td class="buttonOffRight" id="btn1_43"></td>
											</tr>
										</table>
										</td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					id="crmGrid" class="gridControl gridArea">
					<tr>
						<td width="10%" class="align_left"><span
							class=" grid_head_line">${key.chargeItem}</span></td>
					</tr>
				</table>
				<div style="overflow:auto;height:200px;">
				<div id="search_result" style="display:;">

				<table width="100%" border="0" cellspacing="0" cellpadding="0"
					class='gridData' id="simple">
					<c:forEach items="${chargeItemList}" var="chargeItem">
						<tr class="grid" onclick="changeID('${chargeItem.keyword}','${chargeItem.itemName}')">
							<td width="10%" class="grid align_left">${chargeItem.itemName}</td>
						</tr>
					</c:forEach>
				</table>
				</div>
				</div>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="window_footer">
		<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="btn_between_space">&nbsp;</td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="buttonOffLeft" id="btn1_21"></td>
						<td class="buttonOffMiddle" id="btn1_22" onClick="save()"
							onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)"
							onBlur="btn_change(2)"><img src="${ctx}/images/ico_ok.gif"
							alt="" width="14" height="14" border="0" align="absbottom">
						${key.save}</td>
						<td class="buttonOffRight" id="btn1_23"></td>
					</tr>
				</table>
				</td>
				<td class="btn_between_space"></td>
				<td>
				<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="buttonOffLeft" id="btn1_31"></td>
						<td class="buttonOffMiddle" id="btn1_32" onClick="windowClose();"
							onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"
							onBlur="btn_change(3)"><img
							src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14"
							border="0" align="absbottom"> ${key.close}</td>
						<td class="buttonOffRight" id="btn1_33"></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		<p>&nbsp;</p>
		</td>
	</tr>
</table>
</form>
</body>
</html>
